home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
ctutor.exe
/
SOURCE
/
SIMPLEIO.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-15
|
630b
|
29 lines
/* Chapter 9 - Program 1 - SIMPLEIO.C */
#include "stdio.h" /* standard header for input/output */
void main()
{
char c;
printf("Enter any characters, X = halt program.\n");
do {
c = getchar(); /* get a single character from the kb */
putchar(c); /* display the character on the monitor */
} while (c != 'X'); /* until an X is hit */
printf("\nEnd of program.\n");
}
/* Result of execution
Enter any characters, X = halt program.
(The output depends on what you type in.)
End of program.
*/